<template>
  <div class="page_role_mgr">
    <Row style="margin: 5px 0px 10px 0px;">
      <Input placeholder="输入关键信息进行查询" style="width: 200px;margin-right: 20px"/>
      <Button type="primary" icon="ios-search" style="margin-right: 20px">查询</Button>
    </Row>
    <Row class="list_row">
      <Table :columns="columns" border :data="logList" stripe>
        <template slot-scope="{ row, index }" slot="seq">
          {{(currentPage - 1) * pageSize + index + 1}}
        </template>
      </Table>
      <div class="div_page">
        <Page :total="totalCount" :current="currentPage" :page-size="pageSize"
              show-total show-elevator prev-text="<" next-text=">" @on-change="pageChg"/>
      </div>
    </Row>
  </div>
</template>

<script>
  import tables from '@/components/tables'
  import RoleApi from '@/api/roleApi'

  export default {
    components: {tables},
    name: "page_ope_log",
    data() {
      return {
        currentPage: 1,
        totalCount: null,
        pageSize: 10,
        logList: [
          {userName: '陈小二1', module: '系统管理', event: '登陆', createTime: '2020-04-20 13:22:44', detail: '用户登陆系统'},
          {userName: '陈小二2', module: '系统管理', event: '登陆', createTime: '2020-04-20 13:22:44', detail: '用户登陆系统'},
          {userName: '陈小二3', module: '系统管理', event: '登陆', createTime: '2020-04-20 13:22:44', detail: '用户登陆系统'},
          {userName: '陈小二4', module: '系统管理', event: '登陆', createTime: '2020-04-20 13:22:44', detail: '用户登陆系统'},
          {userName: '陈小二5', module: '系统管理', event: '登陆', createTime: '2020-04-20 13:22:44', detail: '用户登陆系统'},
          {userName: '王大个1', module: '企业管理', event: '新增企业信息', createTime: '2020-04-20 13:22:44', detail: '用户新增企业信息：泉州XXX健身俱乐部1'},
          {userName: '王大个2', module: '企业管理', event: '新增企业信息', createTime: '2020-04-20 13:22:44', detail: '用户新增企业信息：泉州XXX健身俱乐部1'},
          {userName: '王大个3', module: '企业管理', event: '新增企业信息', createTime: '2020-04-20 13:22:44', detail: '用户新增企业信息：泉州XXX健身俱乐部1'},
          {userName: '王大个4', module: '企业管理', event: '新增企业信息', createTime: '2020-04-20 13:22:44', detail: '用户新增企业信息：泉州XXX健身俱乐部1'},
          {userName: '王大个5', module: '企业管理', event: '新增企业信息', createTime: '2020-04-20 13:22:44', detail: '用户新增企业信息：泉州XXX健身俱乐部1'}
        ],
        columns: [
          {
            title: '序号',
            slot: 'seq',
            width: 80
          },
          {
            title: '用户',
            key: 'userName',
            width: 120
          },
          {
            title: '模块',
            key: 'module',
            width: 120
          },
          {
            title: '事件',
            key: 'event',
            width: 120
          },
          {
            title: '日志信息',
            key: 'detail',
          },
          {
            title: '日志时间',
            key: 'createTime',
            width: 170
          },
          {
            title: '操作',
            width: 80,
            key: 'action',
            render: (h, params) => {
              return h('div', [
                h('Button', {
                  props: {
                    type: 'primary',
                    size: 'small'
                  },
                  style: {
                    marginRight: '15px'
                  },
                  on: {
                    click: () => {
                    }
                  }
                }, '详情')
              ]);
            }
          }
        ]
      }
    },
    methods: {
      pageChg() {

      }
    },
    created() {
    }
  }
</script>
